<template>
  <div id="all">
    <div>
      <h2>mock使用案例</h2>
      <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
        <el-tab-pane label="官方资料" name="index">
          <Index></Index>
        </el-tab-pane>
        <el-tab-pane label="请求拦截" name="second">
          <Axios></Axios>
        </el-tab-pane>
        <el-tab-pane label="请求拦截封装" name="second2">
          <Axios2></Axios2>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
import Index from "@/components/mock/index.vue";
import Axios from "@/components/mock/axios.vue";
import Axios2 from "@/components/mock/axios2.vue";
export default {
  name: "mockBox",
  components: {
    Index,
    Axios,
    Axios2,
  },
  data() {
    return {
      activeName: "index",
    };
  },
  mounted() {},
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
      console.log("activeName", this.activeName);
    },
  },
};
</script>

<style scoped="scoped">
#all {
  width: 100%;
  height: 100%;
  background-color: #fff;
}
</style>
